Introducing the WebAssembly backend for TensorFlow.js — The TensorFlow Blog
Why WASM
WASM has been supported by Chrome, Safari, Firefox, and Edge since 2017, and is supported by 90% of devices worldwide.
Performance
wasm > js
webgl > wasm
ultra-lite models (3Mb <=, 60M MADD <=) ではwebgl > wasm
Portablility, Stability
webglは16,32bit。32bit指定でもOSがサポートせず16bitになったり
これが精度に影響、する?
wasmは常に32bit
When should I use WASM?
In general, WASM is a good choice when models are smaller, if you care about wide device support, or if your project is sensitive to numerical stability. WASM
We observe the WASM backend to be 10-30x faster than the plain JS (CPU) backend across our models. Comparing WASM to WebGL, there are two main takeaways:
WASM is on-par, or faster than WebGL for ultra-lite models like MediaPipe’s BlazeFace and FaceMesh.
WASM is 2-4X slower than WebGL for medium-sized edge models like MobileNet, BodyPix and PoseNet.
SIMD / QFMA
multithreading